package com.seocoo.worker.base;

import android.app.Activity;
import android.support.annotation.ColorInt;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;

import com.jaeger.library.StatusBarUtil;

public class UtilStatus {
    public static void initStatus(Activity activity, @ColorInt int color) {

        StatusBarUtil.setLightMode (activity);
        StatusBarUtil.setColor (activity, color, 0);
        View view = activity.findViewById (Window.ID_ANDROID_CONTENT);
        if (view instanceof ViewGroup) {
            ViewGroup group = (ViewGroup) view;
            if (group.getChildCount () > 0) {
                group.getChildAt (0).setFitsSystemWindows (true);
            }
        }
    }
}
